<template>
  <div>
       <mc-input v-model="v2" :maxlength="30"  :mc-rule="['num']" @focus="focusMe" @blur="bl" @mc-input="input"></mc-input>
       <!--<mc-input v-model="v" :maxlength="30"  :user-rule="[{r:'^\\d{2}$',t:'必须是2位数字'}]"></mc-input>-->
        <!--<el-input v-model="v2" @input="input"></el-input>-->
       <el-button @click="print">打印</el-button>
       <el-button @click="change">改变</el-button>
  </div>
</template>

<script>
import McInput from "./components/McInput";
export default {
    data(){
      return {
        v:"12",
        v2:"12",
      }
    },
    components:{
      McInput,
    },
    methods:{
      input:function(){
          console.log("input")
      },
      focusMe:function(){
          console.log("focus")
      },
      bl:function(){
          console.log("blur")
      },
        print(){
            console.log(this.v);
        },
        change(){
            //this.form.userName = false;
            this.v = "dfd"
        }
    }
}
</script>

<style>

</style>
